package com.itheima;

import com.itheima.domain.Dep;
import com.itheima.domain.Patient;
import com.itheima.service.PatientService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext.xml","classpath:sqlMapConfig.xml"})
public class test {

    @Autowired
    private PatientService patientService;
    @Test
    public void test01(){


        List<Dep> depList = patientService.findDepAll();
        System.out.println(depList);

    }

    @Test
    public void test02(){


        List<Patient> patientList = patientService.findAll();
        System.out.println(patientList);

    }

    @Test
    public void test03(){


        List<Patient> patient = patientService.findByName("aaa");
        System.out.println(patient);

    }
}
